package day06继承;

public class Cylinder extends Circle{
    private double length = 1;//高

    public Cylinder(){

    }

    public Cylinder(double length) {
        this.length = length;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }


    //求圆柱的体积
    public double findVolume(){
        return findArea() * getLength();
    }

    @Override
    public String toString() {
        return "Cylinder{" +
                "length=" + length +
                '}';
    }
}

